//
//  TGChoosePhotoView.h
//  TongGuanLease
//
//  Created by 张奇 on 2022/4/20.
//

#import <UIKit/UIKit.h>
#import "TGEnumDefine.h"
@class TGUrlInfoModel;
///collectionView宽度
#define PhotoCollectionViewWidth (SCREEN_WIDTH-TableViewSpace*2)
///根据行数获取 collectionView高度
#define PhotoCollectionViewHeight(R) ((PhotoCollectionViewWidth-TableViewSpace*3.0)/4.0*R+TableViewSpace*(R-1))


NS_ASSUME_NONNULL_BEGIN
@protocol TGChoosePhotoViewDelegate <NSObject>

- (void)tgChoosePhotoViewDidSelectImgArray:(NSArray * _Nonnull)imgArray
                               imgUrlInfoArray:(NSArray <TGUrlInfoModel *>* _Nonnull)imgUrlInfoArray;

@end


@interface TGChoosePhotoView : UIView

- (instancetype)initWithMaxCount:(NSInteger)maxCount
                 uploadImageType:(UploadImageType)uploadImageType
                        delegate:(id<TGChoosePhotoViewDelegate>)delegate;

@property (assign, nonatomic) id<TGChoosePhotoViewDelegate> delegate;
@property (nonatomic, assign) NSInteger maxCount;
@property (assign, nonatomic) UploadImageType uploadImageType;
/// 是否添加水印-此时仅拍照
@property (nonatomic, assign) BOOL isAddWaterImage;
/// 已经选中的图片model数组
@property (strong, nonatomic) NSArray <TGUrlInfoModel *>*selectImageUrlInfoArray;

///为退场提供一个批量上传图片的方法
+ (void)updateImagePhotos:(NSArray <UIImage *> *)images finish:(ComplentValueBlock)finish;

@end

NS_ASSUME_NONNULL_END
